package hy;

import org.apache.commons.codec.digest.DigestUtils;
import org.junit.Test;

public class MyTest {
    @Test
    public void a(){
        String s="aelldddddddo";
        byte[] arr = s.getBytes();
        for (int i = 0; i < arr.length; i++) {
            arr[i]=(byte)(arr[i]^98);
        }
        for (int i = 0; i < arr.length; i++) {
            arr[i]=(byte)(arr[i]^98);
        }
        System.out.println("得到："+new String(arr));
    }

    @Test
    public void b(){
        System.out.println(DigestUtils.sha256Hex("hello".getBytes()));
        System.out.println(DigestUtils.sha256Hex("hello".getBytes()));
    }
}
